/* 做题页面样式 */

/* 顶部导航 */
.exam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: var(--primary-color);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left, .header-right {
    flex: 1;
}

.header-center {
    flex: 2;
    text-align: center;
}

.exit-btn {
    color: white;
    font-size: 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.exit-btn i {
    margin-right: 5px;
}

.exam-progress {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
}

.progress-bar {
    height: 6px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress {
    height: 100%;
    background-color: white;
    border-radius: 3px;
}

.question-counter {
    font-size: 12px;
}

.exam-timer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 14px;
}

.exam-timer i {
    margin-right: 5px;
}

/* 题目内容 */
.question-container {
    padding: 20px 15px;
    background-color: var(--card-color);
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.question-type {
    font-size: 14px;
    color: var(--accent-color);
    margin-bottom: 15px;
    padding: 5px 10px;
    background-color: rgba(255, 112, 67, 0.1);
    border-radius: 5px;
    display: inline-block;
}

.question-content {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: var(--text-color);
}

.options-list {
    margin-bottom: 10px;
}

.option-item {
    display: flex;
    padding: 12px 15px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.option-item:hover {
    border-color: var(--primary-color);
    background-color: rgba(74, 107, 223, 0.05);
}

.option-item.selected {
    border-color: var(--primary-color);
    background-color: rgba(74, 107, 223, 0.1);
}

.option-item.correct {
    border-color: var(--success-color);
    background-color: rgba(76, 175, 80, 0.1);
}

.option-item.wrong {
    border-color: var(--error-color);
    background-color: rgba(244, 67, 54, 0.1);
}

.option-marker {
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--background-color);
    color: var(--light-text);
    border-radius: 50%;
    margin-right: 15px;
    font-weight: bold;
    flex-shrink: 0;
}

.option-item.selected .option-marker {
    background-color: var(--primary-color);
    color: white;
}

.option-item.correct .option-marker {
    background-color: var(--success-color);
    color: white;
}

.option-item.wrong .option-marker {
    background-color: var(--error-color);
    color: white;
}

.option-content {
    flex: 1;
    font-size: 15px;
    line-height: 1.5;
    display: flex;
    align-items: center;
}

/* 操作区域 */
.question-actions {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    background-color: var(--card-color);
    margin-bottom: 80px; /* 为底部工具栏留出空间 */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.left-actions, .right-actions {
    display: flex;
    gap: 10px;
}

.action-btn, .nav-btn {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    background-color: transparent;
    color: var(--light-text);
    font-size: 13px;
    cursor: pointer;
}

.action-btn:hover, .nav-btn:hover {
    background-color: var(--background-color);
}

.action-btn i, .nav-btn i {
    margin-right: 5px;
}

.nav-btn.next-btn i {
    margin-right: 0;
    margin-left: 5px;
}

.nav-btn {
    background-color: var(--primary-color);
    color: white;
}

/* 答案解析 */
.answer-explanation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 414px;
    margin: 0 auto;
    background-color: var(--card-color);
    border-radius: 15px 15px 0 0;
    padding: 20px;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
    z-index: 200;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    max-height: 75vh;
    overflow-y: auto;
}

.answer-explanation.shown {
    transform: translateY(0);
}

.answer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.answer-header h3 {
    font-size: 16px;
    margin: 0;
}

.close-explanation {
    background: transparent;
    border: none;
    font-size: 18px;
    color: var(--light-text);
    cursor: pointer;
}

.correct-answer {
    font-size: 15px;
    margin-bottom: 15px;
    padding: 10px;
    background-color: rgba(76, 175, 80, 0.1);
    border-radius: 5px;
}

.answer-label {
    font-weight: bold;
    margin-right: 5px;
}

.answer-value {
    color: var(--success-color);
    font-weight: bold;
}

.explanation-content {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.explanation-content p {
    margin-bottom: 10px;
}

.key-points {
    background-color: var(--background-color);
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.key-points h4 {
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.key-points ul {
    padding-left: 20px;
    margin: 0;
}

.key-points li {
    font-size: 14px;
    margin-bottom: 5px;
}

/* 题目导航面板 */
.question-navigator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--card-color);
    z-index: 300;
    padding: 20px;
    display: none;
    flex-direction: column;
    max-width: 414px;
    margin: 0 auto;
}

.question-navigator.shown {
    display: flex;
}

.navigator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.navigator-header h3 {
    font-size: 18px;
    margin: 0;
}

.close-navigator {
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--light-text);
    cursor: pointer;
}

.question-categories {
    flex: 1;
    overflow-y: auto;
}

.category {
    margin-bottom: 20px;
}

.category-header {
    font-size: 16px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
}

.question-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.number {
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--background-color);
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
}

.number.current {
    background-color: var(--primary-color);
    color: white;
}

.number.answered {
    background-color: var(--success-color);
    color: white;
}

.number.marked {
    background-color: var(--warning-color);
    color: white;
}

.navigator-actions {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nav-action-btn {
    padding: 12px;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.legend {
    display: flex;
    justify-content: space-around;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 12px;
}

.legend-item .number {
    width: 20px;
    height: 20px;
    margin-right: 5px;
}

/* 底部工具栏 */
.bottom-toolbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 414px;
    margin: 0 auto;
    display: flex;
    background-color: var(--card-color);
    border-top: 1px solid var(--border-color);
    z-index: 100;
}

.toolbar-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    border: none;
    background: transparent;
    color: var(--light-text);
    font-size: 12px;
    cursor: pointer;
}

.toolbar-btn i {
    font-size: 18px;
    margin-bottom: 5px;
}

.toolbar-btn:hover {
    color: var(--primary-color);
}

.submit-exam-btn {
    color: var(--primary-color);
}

/* 多选题样式 */
.question-container.multi-select .option-item {
    position: relative;
}

.question-container.multi-select .option-marker {
    border-radius: 5px;
}

.option-checkbox {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 3px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.option-item.selected .option-checkbox {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.option-item.selected .option-checkbox:after {
    content: "\f00c";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: white;
    font-size: 12px;
}

/* 判断题样式 */
.true-false-options {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.true-false-option {
    flex: 1;
    padding: 15px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.true-false-option:hover {
    border-color: var(--primary-color);
    background-color: rgba(74, 107, 223, 0.05);
}

.true-false-option.selected {
    border-color: var(--primary-color);
    background-color: rgba(74, 107, 223, 0.1);
    color: var(--primary-color);
}

.true-false-option.correct {
    border-color: var(--success-color);
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--success-color);
}

.true-false-option.wrong {
    border-color: var(--error-color);
    background-color: rgba(244, 67, 54, 0.1);
    color: var(--error-color);
}

.true-false-option i {
    margin-right: 8px;
}

/* 案例分析题样式 */
.case-section {
    background-color: var(--background-color);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.6;
}

.case-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.subquestion {
    margin-top: 25px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.subquestion-title {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 15px;
}

/* 响应式调整 */
@media (max-width: 320px) {
    .option-content {
        font-size: 14px;
    }
    
    .toolbar-btn span {
        display: none;
    }
    
    .toolbar-btn i {
        margin-bottom: 0;
    }
} 